<?php
include DOCUMENT_ROOT."/Framework/controller.class.php";


// =============================================================================
/*
 * 登录
 */
class IndexController extends controller{
    public function register(){
         parent::header();
         parent::smartyAction("Index");
        $this->smarty->display("denglu.html");
    }
    
    public function check(){
        $name=$_GET["name"];
        $pwd=$_GET["pwd"];
        include DOCUMENT_ROOT."/Application/Index/model/LoginModel.class.php";
        $LoginModel=new LoginModel();
        $result=$LoginModel->select("name='$name' And pwd='$pwd'");
        if($result){
            echo 1;
        }else{
            echo 0;
        }      
    }
    
    
}


